package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.Member;
import com.itheima.pojo.Order;
import com.itheima.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author Lz
 * @date 2020-03-08 10:14
 * @week 星期日
 */
public interface BackendMemberDao {
    public Page<Member> findPage(String queryString);

    public User findUserByMemberId(Integer id);

    public List<User> findAllHealthManager();

    public void add(Member member);

    public void addMemberAndUser(@Param("memberId") Integer memberId, @Param("healthManagerId") Integer healthManagerId);

    public Map findById(Integer id);

    public void edit(Map<String, Object> map);

    public void editMemberAndUser(@Param("userId") Integer userId, @Param("memberId") Integer memberId);

    //  删除会员
    public  void  deleteMember(Integer id);
    // 删除会员用户中间表
    public  void  deleteMemberAndUserById(Integer id);
    //  查询会员有没有绑定用户
    public  Long findMemberAndUserById(Integer id);
    // 查询会员有没有订单
    public Order fingMemberOrderById(Integer id);
}
